﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace BloodThirsty
{
    public abstract class VisibleGameObject
    {
        public GameSprite[] Sprites;
        public int nSprite;

        protected float _x;
        public virtual float X
        {
            get { return _x; }
            set { _x = value; }
        }

        protected float _y;
        public virtual float Y
        {
            get { return _y; }
            set { _y = value; }
        }

        protected float _width;
        public virtual float Width
        {
            get { return _width; }
            set { _width = value; }
        }

        protected float _height;
        public virtual float Height
        {
            get { return _height; }
            set { _height = value; }
        }

        protected Rectangle _rect;
        public virtual Rectangle Rect
        {
            get { return _rect; }
            set { _rect = value; }
        }

        private bool _isMouseHover=false;

        public bool isMouseHover
        {
            get { return _isMouseHover; }
            set { _isMouseHover = value; }
        }

        public virtual void Init(ContentManager contenmanager)
        { }

        public virtual void Update(GameTime gametime)
        {
            foreach (GameSprite gameSprite in this.Sprites)
            {
                gameSprite.Update(gametime);
            }
        }

        public virtual void Draw(GameTime gametime, SpriteBatch spritebatch)
        {
            foreach (GameSprite gameSprite in this.Sprites)
            {
                gameSprite.Draw(gametime, spritebatch);
            }
        }

        public virtual VisibleGameObject Clone()
        {
            return null;
        }


    }
}
